<?php
/**
 * Created by PhpStorm.
 * User: yzr
 * Date: 1/31/2021
 * Time: 14:10
 */
namespace app\api\controller\wap;

use app\common\model\base\Archives;
use mall\utils\Tool;

class Notice extends Base
{

    /**
     * 首页公告信息
     */
    public function index()
    {
        $list = (new Archives())->getList($condition=['archives.pid'=>1160],$size=2,$page=1);
        //p($list['data']);exit;
        $list['data'] = array_map(function($value){
            $value = $value->toArray();
            return $value;
        },$list['data']);
        //p($list);exit;
        $list = [
            'list'  => $list['data'],
        ];
        return $this->returnAjax("ok",1,$list);
    }
}
